function eatNum(n, timer) {
    let count = 0
    for(let i = n; i > 1; i /= 2) {
        count += 1
    }
    return timer*count
}

// console.log(eatNum(10, 5))
